package com.slz3.business.module.memberManagement.memThirdLoginInfo.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.memberManagement.memThirdLoginInfo.domain.MemThirdLoginInfo;
import com.slz3.business.module.memberManagement.memThirdLoginInfo.domain.MemThirdLoginInfoCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MemThirdLoginInfoResController {

    static Mono<ServerResponse> add(ServerRequest req, MemThirdLoginInfo memThirdLoginInfo) {
        if (MemThirdLoginInfoResUnsafeValid.add(req, memThirdLoginInfo)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return MemThirdLoginInfoResAtomic.add_$MemThirdLoginInfoUpdateLock(req, memThirdLoginInfo);
        }
    }

    static final Mono<ServerResponse> delete(ServerRequest req, MemThirdLoginInfoCondition memThirdLoginInfoCondition) {
        if (MemThirdLoginInfoResUnsafeValid.delete(req, memThirdLoginInfoCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return MemThirdLoginInfoResAtomic.delete_$MemThirdLoginInfoUpdateLock(req, memThirdLoginInfoCondition);
        }
    }

    static Mono<ServerResponse> modify(ServerRequest req, MemThirdLoginInfo memThirdLoginInfo) {
        if (MemThirdLoginInfoResUnsafeValid.modify(req, memThirdLoginInfo)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return MemThirdLoginInfoResAtomic.modify_$MemThirdLoginInfoUpdateLock(req, memThirdLoginInfo);
        }
    }

    static Mono<ServerResponse> list(ServerRequest req) {
        if (MemThirdLoginInfoResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return MemThirdLoginInfoResExecutor.list(req);
        }
    }

    static Mono<ServerResponse> info(ServerRequest req) {
        if (MemThirdLoginInfoResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return MemThirdLoginInfoResAtomic.info_$MemThirdLoginInfoUpdateLock(req);
        }
    }

    static Mono<ServerResponse> choice(ServerRequest req) {
        if (MemThirdLoginInfoResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return MemThirdLoginInfoResExecutor.choice(req);
        }
    }

    static final Mono<ServerResponse> auditSubmit(ServerRequest req, MemThirdLoginInfoCondition memThirdLoginInfoCondition) {
        //
        if (MemThirdLoginInfoResUnsafeValid.auditSubmit(req, memThirdLoginInfoCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return MemThirdLoginInfoResAtomic.auditSubmit_$MemThirdLoginInfoUpdateLock(req, memThirdLoginInfoCondition);
        }
    }

    static final Mono<ServerResponse> audit(ServerRequest req, MemThirdLoginInfoCondition memThirdLoginInfoCondition) {
        if (MemThirdLoginInfoResUnsafeValid.audit(req, memThirdLoginInfoCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return MemThirdLoginInfoResAtomic.audit_$MemThirdLoginInfoUpdateLock(req, memThirdLoginInfoCondition);
        }
    }

    static final Mono<ServerResponse> auditReject(ServerRequest req, MemThirdLoginInfoCondition memThirdLoginInfoCondition) {
        if (MemThirdLoginInfoResUnsafeValid.auditReject(req, memThirdLoginInfoCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return MemThirdLoginInfoResAtomic.auditReject_$MemThirdLoginInfoUpdateLock(req, memThirdLoginInfoCondition);
        }
    }

    static final Mono<ServerResponse> usingEnable(ServerRequest req, MemThirdLoginInfoCondition memThirdLoginInfoCondition) {
        if (MemThirdLoginInfoResUnsafeValid.usingEnable(req, memThirdLoginInfoCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return MemThirdLoginInfoResAtomic.usingEnable_$MemThirdLoginInfoUpdateLock(req, memThirdLoginInfoCondition);
        }
    }

    static final Mono<ServerResponse> usingDisable(ServerRequest req, MemThirdLoginInfoCondition memThirdLoginInfoCondition) {
        if (MemThirdLoginInfoResUnsafeValid.usingDisable(req, memThirdLoginInfoCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return MemThirdLoginInfoResAtomic.usingDisable_$MemThirdLoginInfoUpdateLock(req, memThirdLoginInfoCondition);
        }
    }

}
